home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / pctj8505.arc / BUG2.PAS < prev    next >
Pascal/Delphi Source File  |  1986-09-14  |  768b  |  32 lines

  1. { BUG2.PAS                                           }
  2. { This program demonstrates how MS-Pascal 3.20       }
  3. { fumbles with nested REAL assignments.              }
  4. {                                                    }
  5.  
  6. PROGRAM bug2(output) ;
  7.  
  8.   PROCEDURE outer ;
  9.  
  10.     VAR
  11.       x,y : real ;
  12.  
  13.     PROCEDURE inner ;
  14.  
  15.       BEGIN {inner}
  16.         x := y ;
  17.         writeln('x and y should both equal 77.77') ;
  18.         writeln('x = ',x) ;
  19.         writeln('y = ',y) ;
  20.       END ; {inner}
  21.  
  22.     BEGIN {outer}
  23.       x := 55.55 ;
  24.       y := 77.77 ;
  25.       inner ;
  26.     END ; {outer}
  27.  
  28.   BEGIN {bug2}
  29.     writeln('BUG2 RESULTS') ;
  30.     outer ;
  31.   END. {bug2}
  32.